{{define "demin/news.html"}}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  {{$t:=.title}}
  <h1>{{$t}}</h1>
  <p>{{.news.Title}}</p>
  <p>{{.news.Content}}</p>
  {{if ge .score 90}}
    <p>优秀</p>
  {{else if ge .score 80}}
    <p>良好</p>
  {{else if ge .score 60}}
    <p>及格</p>
  {{else}}
    <p>不及格</p>
  {{end}}
  <br>
  <ul>
    {{range $key,$val:=.slice}}
    <li>
      <p>{{$key}}---{{$val}}</p>
    </li>
    {{end}}
  </ul>
  <br>
  <ul>
    {{range $key,$val:=.sliceinterface}}
    <li>
      <p>{{$key}}---{{$val.Title}}---{{$val.Content}}</p>
    </li>
    {{end}}
  </ul>
  <br>
  <ul>
    {{range $key,$val:=.slicetest}}
    <li>
      <p>{{$key}}---{{$val}}</p>
    </li>
    {{else}}
    <p>
      没有数据
    </p>
    {{end}}
  </ul>  
  <br>
  <p>{{.msg.Title}}</p>
  <p>{{.msg.Content}}</p>
  <br>
  {{with .msg}}
  <p>{{.Title}}</p>
  <p>{{.Content}}</p>
  {{end}}
</body>
</html>
{{end}}